import config from "@/config"
import http from "@/utils/request"


export default {
	list: {
		url: `${config.API_URL}/course-article-sentence/list-page`,
		name: "获取列表",
		get: async function (params) {
			return await http.get(this.url, params);
		}
	},
	sentencelist: {
		url: `${config.API_URL}/course-sentence/list-page`,
		name: "获取列表",
		get: async function (params) {
			return await http.get(this.url, params);
		}
	},
	action: {
		url: `${config.API_URL}/course-article-sentence`,
		name: "用户操作",
		get: async function (params) {
			return await http.get(this.url, params);
		},
		translate: async function (params) {
			let url = `${config.API_URL}/course-article-sentence/translate`;
			return await http.get(url, params);
		},
		words: async function (params) {
			let url = `${config.API_URL}/course-article-sentence/words`;
			return await http.get(url, params);
		},
		post: async function (params) {
			return await http.post(this.url, params);
		},
		put: async function (params) {
			return await http.put(this.url, params);
		},
		delete: async function (params) {
			return await http.delete(this.url, params);
		}
	},
	sentenceaction: {
		url: `${config.API_URL}/course-article-sentence`,
		name: "用户操作",
		get: async function (params) {
			return await http.get(this.url, params);
		},
		post: async function (params) {
			return await http.post(this.url, params);
		},
		put: async function (params) {
			return await http.put(this.url, params);
		},
		delete: async function (params) {
			return await http.delete(this.url, params);
		}
	},
	batch: {
		url: `${config.API_URL}/course-article-sentence/batch`,
		name: "批量删除",
		delete: async function (params) {
			return await http.delete(this.url, params);
		}
	},
}
